package cn.edu.zju.gis.disasterBE.sever.entity.assistants;

import cn.edu.zju.gis.disasterBE.sever.entity.Entity;
import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.sql.Timestamp;

@Data
@TableName("users_assistant")
@ApiModel("审批用户使用的临时表")
public class UserAssistant implements Entity<Integer> {

    @TableId(value = "uid", type = IdType.AUTO)
    @ApiModelProperty(value = "用户自增ID")
    @JSONField(name = "uid")
    private Integer uid;

    @TableField(value = "mailaddr")
    @ApiModelProperty(value = "邮箱地址")
    private String mailAddr;

    @TableField(value = "name")
    @ApiModelProperty(value = "昵称")
    @JSONField(name = "username")
    private String name;

    @TableField(value = "applytime")
    @ApiModelProperty(value = "申请时间")
    private Timestamp applyTime;

    @TableField(value = "work_place")
    @ApiModelProperty(value = "工作地址")
    private String workPlace;

    @TableField(value = "title")
    @JSONField(name = "title")
    @ApiModelProperty(value = "职称")
    private String title;

    @TableField(value = "affiliation")
    @JSONField(name = "affiliation")
    @ApiModelProperty(value = "所在单位")
    private String affiliation;

    @Override
    public Integer id()
    {
        return uid;
    }
}
